import socket

server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM
server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
server.bind(('192.168.110.38', 50002))
print 'udpserver start'
while True:
    data, addr = server.recvfrom(1024)
    print '----------------------------'
    print repr(data)
    print len(data), ''.join(['\\x%02x' % ord(x) for x in data])
    print '++++++++++++++++++++++++++++'
